import Vue from 'vue'
import VueRouter from 'vue-router'
//导入Home.vue
import Home from '../components/Home.vue'
import NewsList from '../components/News/NewsLIst.vue'
import NewsDetail from '../components/News/NewsDetail.vue'
import PhotoList from '../components/Photo/PhotoList.vue'
import PhotoInfo from '../components/Photo/PhotoInfo.vue'
import GoodsList from '../components/Goods/GoodsList.vue'
import GoodsDetail from '../components/Goods/GoodsDetail.vue'
import GoodsDesc from '../components/Goods/GoodsDesc.vue'
import GoodsComment from '../components/Goods/GoodsComment.vue'
import ShopCar from '../components/ShopCar.vue'
import Member from '../components/Member.vue'
import Search from '../components/Search.vue'

Vue.use(VueRouter)



const router = new VueRouter({
  routes:[
    { path:'/' , redirect : '/home' },
    { path:'/home' , component: Home },
    { path:'/newslist' , component: NewsList },
    { path:'/news/detail/:id' , component: NewsDetail },
    { path:'/photo/list' , component: PhotoList },
    { path:'/photo/Info/:id' , component: PhotoInfo },
    { path:'/goods/list' , component: GoodsList },
    { path:'/goods/detail/:id' , component: GoodsDetail },
    { path:'/goodsdesc/:id' , component: GoodsDesc },
    { path:'/goodscomments/:id' , component: GoodsComment },
    { path:'/shopcar' , component: ShopCar },
    { path:'/member' , component: Member },
    { path:'/search' , component: Search }
  ]
})

export default router
